add_executable(rainynite-studio main/main.cpp)

target_sources(rainynite-studio
    PRIVATE
        main/main_window.cpp
        main/main_window.h
        main/about.cpp
        main/about.h

        docks/playback_dock.cpp
        docks/playback_dock.h
        docks/timearea_dock.cpp
        docks/timearea_dock.h
        docks/node_tree_dock.cpp
        docks/node_tree_dock.h
        docks/node_edit_dock.cpp
        docks/node_edit_dock.h
        docks/close_destroy_dock.h

        widgets/editor_factory.cpp

        widgets/canvas.cpp
        widgets/canvas.h
        widgets/timeline_area.cpp
        widgets/timeline_area.h
        widgets/timeline_ruler.cpp
        widgets/timeline_ruler.h
        widgets/color_button.cpp
        widgets/color_button.h
        widgets/point_value_editor.cpp
        widgets/point_value_editor.h

        canvas/point_item.h
        canvas/point_item.cpp
        canvas/point_editor.cpp
        canvas/point_editor.h
        canvas/bezier_editor.cpp
        canvas/bezier_editor.h
        canvas/rectangle_editor.cpp
        canvas/rectangle_editor.h

        canvas/time_item.h
        canvas/time_item.cpp
        canvas/timeline_cursor.cpp
        canvas/time_editor.cpp
        canvas/time_period_editor.cpp

        generic/node_menu.cpp
        generic/node_menu.h
        generic/node_editor.cpp
        generic/node_editor.h
        generic/custom_widgets.cpp
        generic/custom_widgets.h
        generic/context_listener.cpp
        generic/context_listener.h
        generic/editor_context.cpp
        generic/editor_context.h
        generic/canvas_editor.cpp
        generic/canvas_editor.h
        generic/timeline_editor.cpp
        generic/timeline_editor.h
        generic/dock_registry.h

        models/node_model.cpp
        models/node_model.h
        models/node_list.cpp
        models/node_list.h

        util/strings.h
        util/pen.h
        util/pen.cpp

        resources.qrc
)

target_link_libraries(rainynite-studio geom_helpers)

target_link_libraries(rainynite-studio
    Qt5::Widgets
    time
    document
    filters
    renderers
    fmt
    Threads::Threads
    ${SIGCPP_LIBRARIES}
)

target_include_directories(rainynite-studio
    SYSTEM BEFORE PUBLIC
        ${SIGCPP_INCLUDE_DIRS}
)

configure_file(version.h.cmake.in version.h)

install(
    TARGETS rainynite-studio
    RUNTIME DESTINATION bin
)
